package jp.co.htkk.repository.impl;

import jp.co.htkk.dto.${TableName!}Dto;
import jp.co.htkk.entity.${TableName!};
import jp.co.htkk.mapper.${TableName!}Mapper;
import jp.co.htkk.repository.${TableName!}Repository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class ${TableName!}RepositoryImpl implements ${TableName!}Repository {
    @Autowired
    private ${TableName!}Mapper ${tableName!}Mapper;
    @Override
    public int create${TableName!}(${TableName!} ${tableName!}) {
       return ${tableName!}Mapper.create${TableName!}(${tableName!});
    }

    @Override
    public ${TableName!}Dto get${TableName!}ById(String id) {
        return ${tableName!}Mapper.get${TableName!}ById(id);
    }

    @Override
    public int delete${TableName!}ById(String id) {
        return ${tableName!}Mapper.delete${TableName!}ById(id);
    }

    @Override
    public int update${TableName!}(${TableName!}Dto ${tableName!}Dto)  {
        return ${tableName!}Mapper.update${TableName!}(${tableName!}Dto);
    }
}
